{% extends 'userena/base_userena.html' %}
{% load i18n %}

{% block content_title %}<h2>{% trans 'Profiles' %}</h2>{% endblock %}

{% block content %}
<ul id="profile_list">
  {% for profile in profile_list %}
  <li>
  <a href="{% url userena_profile_detail profile.user.username %}"><img src="{{ profile.get_mugshot_url }}" /></a>
  <a href="{% url userena_profile_detail profile.user.username %}">{{ profile.user.username }}</a>
  </li>
  {% endfor %}

</ul>

{% if is_paginated %}
<div class="pagination">
  <span class="step-links">
    {% if page_obj.has_previous %}
    <a href="{% url userena_profile_list_paginated page_obj.previous_page_number %}">{% trans 'previous' %}</a>
    {% endif %}

    <span class="current">
      {% blocktrans with page_obj.number as page and page_obj.paginator.num_pages as num_pages %}
      Page {{ page }} of {{ num_pages }}
      {% endblocktrans %}
    </span>

    {% if page_obj.has_next %}
    <a href="{% url userena_profile_list_paginated  page_obj.next_page_number %}">{% trans 'next' %}</a>
    {% endif %}
  </span>
</div>
{% endif %}
{% endblock %}
